// To parse this JSON data, do
//
//     final httpResponse = httpResponseFromJson(jsonString);

import 'dart:convert';

HttpResponse httpResponseFromJson(String str) => HttpResponse.fromJson(json.decode(str));

String httpResponseToJson(HttpResponse data) => json.encode(data.toJson());

class HttpResponse<T> {
  HttpResponse({
    this.code,
    this.data,
    this.message,
    this.success,
  });

  int code;
  T data;
  String message;
  bool success;

  factory HttpResponse.fromJson(Map<String, dynamic> json) => HttpResponse(
    code: json["code"],
    data: json["data"],
    message: json["message"],
    success: json["success"],
  );

  Map<String, dynamic> toJson() => {
    "code": code,
    "data": data,
    "message": message,
    "success": success,
  };
}
